﻿namespace Trukuxzo.Samples.Creational.Patterns.Client
{
    #region usings
    using Trukuxzo.Samples.Creational.Patterns.AbstractFactory;
    using Trukuxzo.Samples.Creational.Patterns.AbstractProduct;
    using Trukuxzo.Samples.Creational.Patterns.ConcreteFactory;
    #endregion

    public class AbstractFactoryClient
    {
        #region fields
        private AbstractFactoryBrowser _AbstractFactoryBrowser;
        private AbstractProductChromeBrowser _AbstractProductChromeBrowser;
        private AbstractProductFirefoxBrowser _AbstractProductFirefoxBrowser;
        #endregion

        #region constructors
        public AbstractFactoryClient() { }
        #endregion

        #region functions
        public void ImportBookmark64bits()
        {
            _AbstractFactoryBrowser = new ConcreteFactoryBrowser64bits();

            _AbstractProductChromeBrowser = _AbstractFactoryBrowser.CreateProductChromeBrowser();
            _AbstractProductFirefoxBrowser = _AbstractFactoryBrowser.CreateProductFirefoxBrowser();

            _AbstractProductChromeBrowser.ImportBookmark(_AbstractProductFirefoxBrowser);
        }

        public void ImportBookmark32bits()
        {
            _AbstractFactoryBrowser = new ConcreteFactoryBrowser32bits();

            _AbstractProductChromeBrowser = _AbstractFactoryBrowser.CreateProductChromeBrowser();
            _AbstractProductFirefoxBrowser = _AbstractFactoryBrowser.CreateProductFirefoxBrowser();

            _AbstractProductChromeBrowser.ImportBookmark(_AbstractProductFirefoxBrowser);
        }
        #endregion

    }
}
